/PROG  PNS0017
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "LYRA_6895/97";
PROG_SIZE	= 3399;
CREATE		= DATE 23-02-22  TIME 10:11:44;
MODIFIED	= DATE 24-11-08  TIME 11:06:52;
FILE_NAME	= PNS0007;
VERSION		= 0;
LINE_COUNT	= 116;
MEMORY_SIZE	= 3895;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0007 ;
   7:  !  PART:6365100/5200 ;
   8:  !HL_20150710********************* ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.2    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  27:   ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[2]=STOP ;
  36:  R[1]=R[1]+1    ;
  37:  R[2]=TIMER[2]    ;
  38:  R[3]=60/R[2]    ;
  39:  TIMER[2]=RESET ;
  40:  TIMER[2]=START ;
  41:   ;
  42:  !PROCEED TO PICK ;
  43:  LBL[20] ;
  44:  IF DI[1]=ON AND DI[8]=ON,JMP LBL[25] ;
  45:  IF DI[29]=ON,JMP LBL[90] ;
  46:  JMP LBL[20] ;
  47:   ;
  48:  LBL[25] ;
  49:  OVERRIDE=R[5] ;
  50:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  51:  DO[1]=OFF ;
  52:J P[20:PICK_L] 90% CNT0 TB R[18]sec,CALL PARTPICK_L ACC100    ;
  53:  PAYLOAD[2] ;
  54:  CALL CHK_PICK_L    ;
  55:L P[21] 3000mm/sec CNT70    ;
  56:J P[22] 90% CNT70    ;
  57:J P[23:PICK_R] 90% CNT0 TB R[18]sec,CALL PARTPICK_R    ;
  58:  CALL CHK_PICK    ;
  59:   ;
  60:  MONITOR Z_CHECH ;
  61:J P[5:PICK DEPART] 100% CNT100 ACC100    ;
  62:  DO[1]=ON ;
  63:  DO[8]=PULSE,0.5sec ;
  64:J P[7:PICK CLEAR] 100% CNT100 ACC100 DB  500.0mm,CALL END_PICK    ;
  65:  LBL[30:GOTO DROP POUNCE] ;
  66:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  67:   ;
  68:  LBL[40:AT DROP POUNCE] ;
  69:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  70:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  71:  IF DI[18]=ON,JMP LBL[60] ;
  72:  JMP LBL[40] ;
  73:   ;
  74:  LBL[50:MOVE DROP SNEAK] ;
  75:  OVERRIDE=R[5] ;
  76:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  77:  LBL[51:DROP OR C-P-S] ;
  78:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  79:  IF DI[18]=ON,JMP LBL[40] ;
  80:  JMP LBL[51] ;
  81:  JMP LBL[50] ;
  82:   ;
  83:  LBL[60:MOVE CLS-PRS-ACC] ;
  84:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  85:  PAUSE ;
  86:  JMP LBL[30] ;
  87:   ;
  88:  LBL[80:DROP ENABLED] ;
  89:  !PROCEED TO DROP ;
  90:  TIMER[4]=RESET ;
  91:  TIMER[4]=START ;
  92:   ;
  93:  DO[4]=OFF ;
  94:  OVERRIDE=R[5] ;
  95:J P[10:DROP APPROACH] 100% CNT50 ACC100    ;
  96:  MONITOR END Z_CHECH ;
  97:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
  98:  DO[6]=PULSE,1.0sec ;
  99:  PAYLOAD[1] ;
 100:  CALL CHK_DROP    ;
 101:J P[12:DROP DEPART] 100% CNT100 ACC130    ;
 102:  DO[7]=PULSE,1.0sec ;
 103:  TIMER[4]=STOP ;
 104:J P[13:DROP CLEAR] 100% CNT70 ACC130    ;
 105:  !GOTO PICK POUNCE ;
 106:J P[2:PICK POUNCE] 100% CNT70 ACC100    ;
 107:  IF DI[29]=ON,JMP LBL[90] ;
 108:  JMP LBL[10] ;
 109:   ;
 110:  LBL[90:END OF CYCLE] ;
 111:  TIMER[1]=STOP ;
 112:  R[4]=TIMER[1]    ;
 113:J P[1:MIDDLE] 50% CNT100    ;
 114:  MOVE TO HOME    ;
 115:   ;
 116:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2667.639  mm,	Y =   757.470  mm,	Z =  -722.953  mm,
	W =   179.993 deg,	P =     2.102 deg,	R =   -88.818 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2642.508  mm,	Y =   343.709  mm,	Z =  -951.309  mm,
	W =   179.999 deg,	P =     -.000 deg,	R =   -90.001 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2877.858  mm,	Y =   288.502  mm,	Z =  -900.323  mm,
	W =  -179.918 deg,	P =     -.176 deg,	R =   -95.440 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2507.791  mm,	Y =   213.470  mm,	Z =  -931.600  mm,
	W =  -179.904 deg,	P =     -.368 deg,	R =   -93.119 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2833.537  mm,	Y =   -79.689  mm,	Z =  -882.813  mm,
	W =  -179.431 deg,	P =     -.286 deg,	R =   -92.627 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2640.022  mm,	Y = -1049.627  mm,	Z =  -851.440  mm,
	W =  -179.540 deg,	P =     -.565 deg,	R =   -89.615 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2815.594  mm,	Y = -2355.015  mm,	Z =  -953.427  mm,
	W =  -179.515 deg,	P =     -.600 deg,	R =   -90.398 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2694.006  mm,	Y = -3235.906  mm,	Z =  -951.114  mm,
	W =  -179.488 deg,	P =     -.589 deg,	R =   -91.816 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2694.006  mm,	Y = -3235.906  mm,	Z = -1123.193  mm,
	W =  -179.488 deg,	P =     -.589 deg,	R =   -91.816 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2694.006  mm,	Y = -3235.906  mm,	Z =  -989.994  mm,
	W =  -179.488 deg,	P =     -.589 deg,	R =   -91.816 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2844.986  mm,	Y = -1560.917  mm,	Z =  -895.591  mm,
	W =  -179.462 deg,	P =     -.616 deg,	R =   -88.871 deg
};
P[20:"PICK_L"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2877.858  mm,	Y =   288.501  mm,	Z = -1048.643  mm,
	W =  -179.918 deg,	P =     -.176 deg,	R =   -95.440 deg
};
P[21]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2877.858  mm,	Y =   288.502  mm,	Z =  -900.323  mm,
	W =  -179.918 deg,	P =     -.176 deg,	R =   -95.440 deg
};
P[22]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2507.791  mm,	Y =   213.470  mm,	Z =  -931.600  mm,
	W =  -179.904 deg,	P =     -.368 deg,	R =   -93.119 deg
};
P[23:"PICK_R"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2507.790  mm,	Y =   213.470  mm,	Z = -1057.120  mm,
	W =  -179.904 deg,	P =     -.368 deg,	R =   -93.119 deg
};
/END
